#ifndef __MEM_PROC_H_
#define __MEM_PROC_H_

#include "my_types.h"
#include "bitmap.h"


#define PAGE_SHIFT					12
#define VM_LIST_ORDER_MAX 			9
#define min(x, y) 					((x) < (y) ? (x) : (y))

#define VM_PAGE_TO_PHYS(page)    	(page)
#define VM_ORDER_TO_PAGES(order)	(1 << (order))
#define VM_ORDER_TO_PHYS(order)  	(1 << (PAGE_SHIFT + (order)))
#define VM_PHYS_TO_ORDER(phys)   	(min(LOS_LowBitGet((phys) >> PAGE_SHIFT), VM_LIST_ORDER_MAX - 1))


MY_VOID AddPageToFreeList(paddr_t pa, MY_U8 u8Order);
VOID VmPhysPagesFreeContiguous(paddr_t pa, MY_U16 nPages);

#endif



